With the rapid development of information technology, the manufacture of consuming electronic products is becoming more and more diverse. For example, computer, liquid crystal display (LCD) TV, video camera, and digital camera are widely used. Particularly, the slim digital camera is portable for the user and the requirement of the display quality of capture photos and pixel standard are thus more and more increased. However, it is necessary to enhance the quality of the photos by increasing stability of the digital camera when the quality of captured photos may be degraded due to the vibration of the digital camera. Conventionally, when the camera is moved to a predetermined position and its internal optical image stabilizer (OIS) is turned on, the gyro within the camera is capable of detecting the sway status of the camera along all around and a gyro signal is generated. The OIS is compensated according to the gyro signal to stabilize the camera. However, when the camera is at a moving action, not a stable status, the value of gyro signal is increased on the basis of single direction. Meanwhile, since the optical image stabilizer (OIS) is activated by the camera, the camera compensates the optical image stabilizer (OIS), thereby resulting in an abnormal sway status in the preview display area of the camera and downgraded photo quality after the moving action stops at the predetermined position. Such a situation is termed a panning effect. Consequently, there is a need to develop a novel optical image stabilizer (OIS) for solving the aforementioned problems.